import {initAxios} from '../common/tools';

//子账户一键平仓
export const eveningUp = params => {
    return initAxios().post(`/v1/javaApi/eveningUp`, params).then(res => res.data);
};
//子账户分笔平仓
export const eveningUpPerHolding = params => {
    return initAxios().post(`/v1/javaApi/eveningUpPerHolding`, params).then(res => res.data);
};
//手动除权除息
export const doXrdr = params => {
    return initAxios().post(`/v1/javaApi/doXrdr`, params).then(res => res.data);
};

//买入交易关联当日子账户
export const assignBuyDayMakeDeal = params => {
    return initAxios().post(`/v1/javaApi/assignBuyDayMakeDeal`, params).then(res => res.data);
};
//买入交易关联历史子账户
export const assignBuyHistoryMakeDeal = params => {
    return initAxios().post(`/v1/javaApi/assignBuyHistoryMakeDeal`, params).then(res => res.data);
};
//卖出交易关联当日子账户
export const assignSellDayMakeDeal = params => {
    return initAxios().post(`/v1/javaApi/assignSellDayMakeDeal`, params).then(res => res.data);
};
//卖出交易关联历史子账户
export const assignSellHistoryMakeDeal = params => {
    return initAxios().post(`/v1/javaApi/assignSellHistoryMakeDeal`, params).then(res => res.data);
};


//修改母账户余额
export const adjustBalance = params => {
    return initAxios().post(`/v1/javaApi/adjustBalance`, params).then(res => res.data);
};

//手动派股票
export const postDeliveryStock = params => {
  return initAxios().post(`/v1/javaApi/deliveryStock`, params).then(res => res.data);
};

//股票回收
export const postRetrieveStock = params => {
  return initAxios().post(`/v1/javaApi/retrieveStock`, params).then(res => res.data);
};

//结算
export const settleup = params => {
    return initAxios().post(`/v1/javaApi/settleup`, params).then(res => res.data);
};
